home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 4 / The 640 Meg Shareware Studio CD-ROM Volume IV (Data Express)(1994).ISO / clang / 107_01.zip / CTRIG.DOC < prev    next >
Text File  |  1993-06-06  |  2KB  |  102 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.                       NOTES ON TRIG FUNCTIONS FOR BDS - C
  8.  
  9.  
  10.                                   Introduction
  11.  
  12.  
  13.       These trig functions were developed so that I could do some auxiliary work
  14.  
  15. on scaling and curve generation for a graphics package I'm now doing in BDS-C.
  16.  
  17. They seem to work OK in my setup which is now:  
  18.  
  19.        o  Altair 8800b, 64K CPM 2.2 BDS-C vers 1.42 
  20.  
  21.        o  Tarbell SSSD 4 8 inch disk 
  22.  
  23.        o  Scion Microangelo 
  24.  
  25.        o  LSI ADM3A 
  26.  
  27. This package was developed by:  
  28.  
  29. L. C. Calhoun PE 
  30.  
  31. 257 South Broadway 
  32.  
  33. Lebanon, Ohio 45036 
  34.  
  35. <513> 932-4541/433-7510 
  36.  
  37.                             REVISION 1 13 JULY 1981
  38.  
  39.  
  40.       The CTRIG programs have been revised to take advantage of the ability to
  41.  
  42. insert '\0' into string constants which make it possible to use string constant
  43.  
  44. as pseudo-static floating point constants.  In addition, the values of the
  45.  
  46. constants have been revised to improve performance.  An added arctangent
  47.  
  48. function arctan2() has been added to allow quadrant detection for arctangents.
  49.  
  50. The test software "TESTTRIG" has been improved in format, and tests added for
  51.  
  52. arctan2().  
  53.  
  54.  
  55.  
  56.       These programs are written in BDS-C using the floating point package
  57.  
  58. modified to add truncation and magnitude functions.  This package is called
  59.  
  60. "FLOAT+44".  The following functions are mechanized:  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.                                         1
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.      char *sine(result,angle) 
  77.  
  78.      char *result, *angle;   /* usual [5] char arrays for fp */ 
  79.  
  80.           The angle input argument is in radians, within the bounds of the
  81.  
  82.           floating point variable.  The function returns the pointer to the
  83.  
  84.           result.  
  85.  
  86.      char *cosine(result,angle) 
  87.  
  88.      char *result, *angle;   /* as with sine */ 
  89.  
  90.           Identical to the sine 
  91.  
  92.      char *tangent(result,angle) 
  93.  
  94.      char *result, *angle;    /*as with sine */ 
  95.  
  96.      char *arctan(angle,datum) 
  97.  
  98.      char *angle, *datum;    
  99.  
  100.           This returns the angle in radians.  Error conditions, such as too
  101.  
  102.           small or large a datum return "end value" angles.